<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
<jsp:include page="../inc.jsp"></jsp:include>
<meta http-equiv="X-UA-Compatible" content="edge" />
<title>充值记录列表查询页面</title>
<link rel="stylesheet" href="${ctx}/css/page.css"/>
<jsp:include page="../inc_bootstrap.jsp"></jsp:include>
<script type="text/javascript">
$(function(){
	
	$('#bootTable').bootstrapTable({
		url:'${ctx}/withdrawal/selectRechargeRecord?temp='+Math.random(),
        dataType: "json",
        //contentType: "application/x-www-form-urlencoded",
        method: 'get',
        cache: false,
        height: "auto",//
        pagination: true,
        pageSize: 20,
        pageNumber:1,
        pageList: [ 20, 50, 100, 200, 500],
        striped: false,
        search: false,
        showColumns: false,
        showRefresh: false,
        clickToSelect: true,
        idField:'id',
        //toolbar: "#toolbar",
        paginationHAlign: 'left',
        paginationDetailHAlign: 'right',
        sidePagination: "server", //表示服务端请求
        queryParamsType : "undefined",
        //queryParams: queryParams,//参数
        columns: [
            {field:"id",title:"",align:"center",valign:"middle",visible:false},
            {field:"payOrderNumber",title:"充值单号",align:"center",valign:"middle"},
            {field:"createTime",title:"创建时间",align:"center",valign:"middle"},
            {field:"status",title:"状态",align:"center",valign:"middle",formatter:function(value,row,index){
                var str=CommonConverter.toRechargestr(row.status);
                return str;
            }},
            {field:"income",title:"充值金额（元）",align:"center",valign:"middle",formatter : function(value,row,index){
				return CommonConverter.formatMoney(row.income);
			}},
            {field:"name",title:"操作人",align:"center",valign:"middle"},
            {field:"remark",title:"备注",align:"center",valign:"middle"}
        ],
        formatNoMatches: function(){
            return '无符合条件的记录';
        }
    });
	//点击查询 重新加载列表
	$("#query").click(function(){
		//获取参数
		var payOrderNumber="";
		var toStartDate="";
		var toEndDate="";
		payOrderNumber = $("#_orderNumber").val();
		toStartDate=$("#startDate").val();
		toEndDate=$("#endDate").val();
		var param = {query:{
			pageNumber: 1,
			pageSize: 20,
			payOrderNumber:payOrderNumber,
			toStartDate:toStartDate,
			toEndDate:toEndDate
		}};
		$('#bootTable').bootstrapTable('refresh',param);
	});
});

</script>
</head>
<body>
	<jsp:include page="../head.jsp"></jsp:include>
	<div class="content">
			<ul class="list">
				<li>充值单号：<input style='width:120px;height:22px;' id="_orderNumber" /></li>
				<li>充值申请时间 ：
					<input type="text" style="height:22px" id="startDate" class="Wdate"  value="${requestScope.deptDate}" onFocus="new WdatePicker({dateFmt:'yyyy-MM-dd'/*,minDate:'%y-%M-\#{%d+2}',maxDate:'#F{$dp.$D(\'endDate\')}'*/})"/>
					&nbsp;&nbsp;&nbsp;&nbsp;
					至<input type="text" style="height:22px" id="endDate" class="Wdate"  value="${requestScope.endDate}" onFocus="new WdatePicker({dateFmt:'yyyy-MM-dd'/*,minDate:'#F{$dp.$D(\'startDate\')}'*/})">
				</li>
				<li>
				<li class="right"><button class='query' id="query">查询</button></li>
			</ul>
		 <div class="tableBox">
			   <table id="bootTable"></table>
		</div>
	</div>
	<jsp:include page="../footer.jsp"></jsp:include>
</body>
</html>